﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Ext.Net;

public partial class IndexView : System.Web.UI.Page
{
    MyDbHelper mydb = new MyDbHelper();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!X.IsAjaxRequest)
        {
            BindData1();
        }
    }
    public void BindData1()
    {
        string sql = @"select b.modulename,acname,count(acname)as num from Sys_UserActionLog a 
                    inner join Sys_Modules b on b.mid = a.mid
                    inner join Sys_LoginUser u on u.userid= a.userid
                    where acname = '浏览'
                    group by b.modulename,acname order by modulename";
        this.Store1.DataSource = mydb.DM_GetDateSet(sql);
        this.Store1.DataBind();

        sql = @"select username,count(username)as num from Sys_UserActionLog a 
                    inner join Sys_Modules b on b.mid = a.mid
                    inner join Sys_LoginUser u on u.userid= a.userid
                    where acname = '浏览'
                    group by username order by count(username)";
        this.Store2.DataSource = mydb.DM_GetDateSet(sql);
        this.Store2.DataBind();
    }
}